<?php

namespace PAT\CartBundle\Entity;

use Doctrine\ORM\Mapping as ORM;

/**
 * PAT\CartBundle\Entity\CommandProduct
 *
 * @ORM\Entity
 * @ORM\Entity(repositoryClass="PAT\CartBundle\Entity\CommandProductRepository")
 */
class CommandProduct
{
    /**
     * @ORM\Id
     * @ORM\ManyToOne(targetEntity="PAT\CartBundle\Entity\Command")
     */
	protected $command;
	
	/**
	 * @ORM\Id
	 * @ORM\ManyToOne(targetEntity="PAT\ProductBundle\Entity\Product")
	 */
	protected $product;

    /**
     * @var integer $quantity
     *
     * @ORM\Column(name="quantity", type="smallint")
     */
    protected $quantity;


    /**
     * Get id
     *
     * @return integer 
     */
    public function getId()
    {
        return $this->id;
    }

    /**
     * Set quantity
     *
     * @param integer $quantity
     * @return CommandProduct
     */
    public function setQuantity($quantity)
    {
        $this->quantity = $quantity;
    
        return $this;
    }

    /**
     * Get quantity
     *
     * @return integer 
     */
    public function getQuantity()
    {
        return $this->quantity;
    }

    /**
     * Set command
     *
     * @param PAT\CartBundle\Entity\Command $command
     * @return CommandProduct
     */
    public function setCommand(\PAT\CartBundle\Entity\Command $command)
    {
        $this->command = $command;
    
        return $this;
    }

    /**
     * Get command
     *
     * @return PAT\CartBundle\Entity\Command 
     */
    public function getCommand()
    {
        return $this->command;
    }

    /**
     * Set product
     *
     * @param PAT\ProductBundle\Entity\Product $product
     * @return CommandProduct
     */
    public function setProduct(\PAT\ProductBundle\Entity\Product $product)
    {
        $this->product = $product;
    
        return $this;
    }

    /**
     * Get product
     *
     * @return PAT\ProductBundle\Entity\Product 
     */
    public function getProduct()
    {
        return $this->product;
    }
}